<template>
  <div class="dropdown-container">
    <van-dropdown-menu>
      <van-dropdown-item v-if="!companyName.length" disabled>
        <div slot="title">全司<span style="color: #727687">/所有机构</span></div>
      </van-dropdown-item>
      <van-dropdown-item v-else disabled>
        <div slot="title">
          <span>{{ companyName }}</span>
        </div>
      </van-dropdown-item>
      <span class="search"></span>
    </van-dropdown-menu>
  </div>
</template>

<script>
export default {
  props: ['companyName']
}
</script>

<style lang="scss" scoped>
.dropdown-container {
  /deep/.van-dropdown-menu {
    width: 100%;
    position: relative;
    .van-dropdown-menu__bar {
      width: 100%;
      height: 30px;
      border-radius: 6px;
      background: $select-color;
      .van-dropdown-menu__item {
        flex: none;
        .van-dropdown-menu__title {
          font-size: 14px;
          width: 170px;
          color: #fff;
          &::after {
            display: none;
          }
        }
      }
    }
    .search {
      position: absolute;
      top: 12px;
      right: 10px;
      z-index: 1;
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 7px solid $font-color;
    }
  }
}
</style>
